from sqlalchemy.dialects.mysql import INTEGER, VARCHAR,JSON
from sqlalchemy import Column
from sqlalchemy.ext.declarative import declarative_base
from pydantic import BaseModel
Base = declarative_base()


# tunnel_sensor_original_data表结构
class CalculateStressAnalysis(Base):
    __tablename__ = 'calculate_stress_analysis'

    id = Column(INTEGER, primary_key=True)

    strain_matrix = Column(JSON, nullable=False)
    borehole_stress = Column(JSON, nullable=False)
    dip_angle = Column(VARCHAR(256), nullable=False)
    azimuth_angle = Column(VARCHAR(256), nullable=False)
    geodetic_stress = Column(JSON, nullable=False)
    principal_stresses = Column(JSON, nullable=False)
    create_time = Column(INTEGER, default=0)


